package com.Jin.control;

import com.Jin.pojo.Department;
import com.Jin.service.DepartmentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/Department")
public class DepartmentController {

    @Autowired
    DepartmentServiceImpl departmentServiceimpl;

    @RequestMapping("/getD")
    public List<Department> getDepartment(){
        List<Department> departments = departmentServiceimpl.getDepartment();
        System.out.println(departments);
        return departments;
    }

}
